package cn.waka.sys.admin.service;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import cn.waka.sys.admin.object.Result;

public class ApiService {



    public static interface VideoService {

        @RequestMapping(value = "/video/index/add/", method = RequestMethod.POST, consumes = "application/json")
        Result add(@RequestParam("id") String id, @RequestParam("title") String title, @RequestParam("img") String img);

        @RequestMapping(value = "/video/index/delete/", method = RequestMethod.POST, consumes = "application/json")
        Result delete(@RequestParam("id") String id);

    }

    public class PushRemoteServiceFallback implements VideoService {
        @Override
        public Result add(String boxId, String event, String content) {
            Result rs = new Result();
            rs.setCode(-505);
            rs.setMsg("消息服务器出现异常");
            return rs;
        }

        @Override
        public Result delete(String boxId) {
            Result rs = new Result();
            rs.setCode(-505);
            rs.setMsg("消息服务器出现异常");
            return rs;
        }
    }

}
